<@_contentProductList title=title userId=userId startPrice=startPrice endPrice=endPrice orderField=orderField orderType=orderType pageIndex=pageNum pageSize=numPerPage>
<div class="pageHeader">
    <form class="pagerForm" autocomplete="off" onsubmit="return navTabSearch(this);" method="post">
        <#include "../include_page/parameters.html"/>
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label><@t.page 'title'/>:</label>
                    <input type="text" name="title" value="${title!}" />
                </li>
                <li>
                    <label><@t.page 'content.promulgator'/>:</label>
                    <#include "../include_page/userId.html"/>
                </li>
                <li>
                    <label><@t.page 'product.price'/>:</label>
                    <input type="text" name="startPrice" value="${endPprice!}" size="10"/><span>-</span><input type="text" name="endPrice" value="${endPrice!}" size="10"/>
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <button type="submit" class="buttonActive"><@t.page 'button.search'/></button>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<@_sysAuthorized roleIds=admin.roles urls='cmsContentProduct/add'><#assign authorizedMap=map/></@_sysAuthorized>
<div class="pageContent">
    <table class="table" width="100%" layoutH="92">
        <thead>
            <tr>
                <th width="20"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
                <th><@t.page 'id'/></th>
                <th><@t.page 'title'/></th>
                <th><@t.page 'content.promulgator'/></th>
                <th orderField="price" class="<#if orderField?has_content&&'price'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>"><@t.page 'product.price'/></th>
                <th><@t.page 'product.quantity_limit'/></th>
                <th orderField="inventory" class="<#if orderField?has_content&&'inventory'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>"><@t.page 'product.inventory'/></th>
                <th orderField="sales" class="<#if orderField?has_content&&'sales'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>"><@t.page 'product.sales'/></th>
                <th width="100"><@t.page 'operate'/></th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
                <@t.merge 'userIds' a.userId!/>
                <@t.merge 'contentIds' a.contentId!/>
            </#list>
            <@_sysUser ids=t.userIds!><#assign userMap=map!/></@_sysUser>
            <@_content ids=t.contentIds!><#assign contentMap=map!/></@_content>
            <#list page.list as a>
            <tr>
                <td class="center"><input name="ids" value="${a.id}" type="checkbox"></td>
                <td>${a.id!}</td>
                <td class="wrap">
                    <#if a.cover?has_content || (contentMap[a.contentId?string].cover)?has_content>
                        <div class="thumbnail">
                            <img src="${(a.cover)!(contentMap[a.contentId?string].cover)!}"/>
                        </div>
                    </#if>
                    <div class="box">
                        <h3>${a.title!}</h3>
                        <p class="exclude-translate">
                            <a href="cmsContent/view.html?id=${a.contentId!}" class="exclude-translate" target="dialog" rel="viewContent${a.contentId!}">${(contentMap[a.contentId?string].title)!}</a>
                        </p>
                    </div>
                </td>
                <td>${(userMap[a.userId?string].nickName)!}</td>
                <td>${a.price!}</td>
                <td>${a.minQuantity!} - ${a.maxQuantity!}</td>
                <td>${a.inventory!}</td>
                <td>${a.sales!}</td>
                <td class="wrap">
                    <a href="cmsContentProduct/add.html?id=${a.id}" class="edit btnText blue" target="dialog" rel="cmsContentProduct_edit"><i class="icon-edit"></i> <@t.page 'button.edit'/></a>
                </td>
            </tr>
            </#list>
        </tbody>
    </table>
    <#include "../include_page/page.html"/>
</div>
</@_contentProductList>